using UnityEngine;
using QFramework;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

namespace ProjectChildhood
{
	public partial class LaunchController : ViewController
	{
		public Button btn_launch; 

		void Start()
		{
			// Code Here
			btn_launch.onClick.AddListener(() =>
			{
                LaunchGame();
            });
		}

        private void Update()
        {
            if (Input.GetKeyUp(KeyCode.Space)) 
			{
				LaunchGame();
			}
        }

		private void LaunchGame()
		{
			SceneManager.LoadScene("Game");
			Global.ResetData();
		}
    }
}
